package com.yyx.lgb.product.service.impl;

import com.yyx.lgb.model.entity.product.Brand;
import com.yyx.lgb.product.mapper.BrandMapper;
import com.yyx.lgb.product.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: BrandServiceImpl
 * Package: com.yyx.lgb.product.service.impl
 * Description:
 *
 * @Author: yyx
 * @Create: 2025/8/11 - 17:01
 */
@Service
public class BrandServiceImpl implements BrandService {
    @Autowired
    private BrandMapper brandMapper;
    @Cacheable(value = "brandList", unless="#result.size() == 0")
    @Override
    public List<Brand> findAll() {
        return brandMapper.findAll();
    }
}
